// const url = require('url');

// const href = '//new.qq.com/00.html?id=100&name=liSi#hash'; 

// let obj = url.parse(href,true);
// console.log(obj);
// console.log(obj.query.name);

// let obj = url.parse(href,true,true);
// console.log(obj);


// let obj = { id:1 , name:'lisi', users:[ 200, { a:30 } ] };
// let { id , name , users:[b,{a}] } = obj;
// console.log(a);
const href = 'https://new.qq.com/00.html?id=100&name=lisi#hash'; 

let url = new URL(href);
// console.log(url);
console.log( url.searchParams.get('id') );
// console.log(url.searchParams.entries());